package org.xdq.springcloud.demo;


import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;

@RestController
public class ServiceController {


    @GetMapping("/s1-t1")
    public String sayHello1(HttpSession session,String uid){
        session.setAttribute("uid",uid);
        return "大家好!!!!!!!!!s1-t1";
    }
    @GetMapping("/s1-t2")
    public String sayHello2(HttpSession session){
        session.removeAttribute("uid");

        return "大家好!!!!!!!!!s1-t2";
    }
}
